<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});
//登录界面
Route::get("/admin/login","Admin\AdminController@showLogin");


//管理员首页
Route::get("/admin/index",function (){
    return view("Admin/index");
});


Route::namespace("Admin")->group(function (){
   Route::any("list","AdminController@mangerAllArticle");
   Route::any("showAddForm","AdminController@showAddForm");
   Route::any("addArticle","AdminController@addArticle");
   Route::any("adminLogin","AdminController@adminLogin");
});